//@author A0096794H
#include "Task.h"

Task::Task(string desc)
{
	description = desc;
	done = false;
}

ResultType Task::setDescription(string desc)
{
	description = desc;
	return SUCCESS;
}

string Task::getDescription()
{
	return description;
}

TaskType Task::getTaskType()
{
	return type;
}

bool Task::markDone()
{
	if (done) {
		return false;
	}
	done = true;
	return true;
}

bool Task::markUndone()
{
	if (!done) {
		return false;
	}
	done = false;
	return true;
}

bool Task::isDone()
{
	return done;
}

int Task::getTaskParameterCounter(){
	return taskParameterCounter;
}

void Task::saveDoneOrNotDone(stringstream &ss){
	if(isDone())
	{
		ss<<",1";
	}
	else
	{
		ss<<",0";
	}
}